CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

#
# Qt4 detection
#

SET( QT_MIN_VERSION 4.7.4 )
FIND_PACKAGE( Qt4 REQUIRED QtCore QtGui QtXml )

IF ( NOT ${QT4_FOUND} )
  MESSAGE( FATAL_ERROR "Qt4 is not (properly) installed on your system, aborting" )
ENDIF ( NOT ${QT4_FOUND} )

MESSAGE( STATUS "Includes: ${QT_USE_FILE}" )

INCLUDE( ${QT_USE_FILE} )

#
# Boost detection
#
FIND_PACKAGE( Boost )
IF ( NOT ${Boost_FOUND} )
  MESSAGE( FATAL_ERROR "Boost is not (properly) installed on your system, aborting" )
ENDIF ( NOT ${Boost_FOUND} )

INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} )

#
# Doxygen detection
#
SET( DOXYGEN_MIN_VERSION 1.8.3.1 )
FIND_PACKAGE( Doxygen )
IF ( NOT ${DOXYGEN_FOUND} )
  MESSAGE( WARNING "doxygen was not found, no documentation will be produced" )
ENDIF ( NOT ${DOXYGEN_FOUND} )

#
# LaTeX detection
#
FIND_PACKAGE( LATEX )
#IF ( NOT ${LATEX_COMPILER} )
#  MESSAGE( FATAL_ERROR "LaTeX is not (properly) installed on your system, aborting" )
#ENDIF ( NOT ${LATEX_COMPILER} )

SET( LOG_SRCS
  src/Base/CColor.cc
  src/Base/CColor.h
  src/Base/FlotMessage.cc
  src/Base/FlotMessage.h
)

SET( UTILS_SRCS
  src/Base/lib.cc
  src/Base/lib.h
  src/Base/StatusCode.cc
  src/Base/StatusCode.h
)

SET( PARSER_SRCS
  src/Base/ElementDOM.cc
  src/Base/ElementDOM.h
  src/Base/Parser.cc
  src/Base/Parser.h
)

SET( BASE_SRCS
  src/Base/ADDObjetBase.cc
  src/Base/ADDObjetBase.h
  src/Base/ADDArticleObjet.cc
  src/Base/ADDArticleObjet.h
  src/Base/ADDItemObjet.cc
  src/Base/ADDItemObjet.h
)

SET( CLASSES_SRCS
  src/Base/Classe.cc
  src/Base/Classe.h
  src/Base/MetaClasse.cc
  src/Base/MetaClasse.h
  src/Base/Barde.cc
  src/Base/Barde.h
  src/Base/Clerc.cc
  src/Base/Clerc.h
  src/Base/Druide.cc
  src/Base/Druide.h
  src/Base/Guerrier.cc
  src/Base/Guerrier.h
  src/Base/Mage.cc
  src/Base/Mage.h
  src/Base/Paladin.cc
  src/Base/Paladin.h
  src/Base/Rodeur.cc
  src/Base/Rodeur.h
  src/Base/Specialiste.cc
  src/Base/Specialiste.h
  src/Base/Voleur.cc
  src/Base/Voleur.h
)

SET( RACES_SRCS
  src/Base/Race.cc
  src/Base/Race.h
  src/Base/MetaRace.cc
  src/Base/MetaRace.h
  src/Base/DemiElfe.cc
  src/Base/DemiElfe.h
  src/Base/DemiOgre.cc
  src/Base/DemiOgre.h
  src/Base/DemiOrque.cc
  src/Base/DemiOrque.h
  src/Base/Elfe.cc
  src/Base/Elfe.h
  src/Base/Gnome.cc
  src/Base/Gnome.h
  src/Base/Hobbit.cc
  src/Base/Hobbit.h
  src/Base/Humain.cc
  src/Base/Humain.h
  src/Base/Nain.cc
  src/Base/Nain.h
)

SET( CORE_SRCS
  src/Base/Caracteristique.cc
  src/Base/Caracteristique.h
  src/Base/Joueur.cc
  src/Base/Joueur.h
  src/Base/Prerequis.cc
  src/Base/Prerequis.h
  src/Base/Sort.cc
  src/Base/Sort.h
  src/Base/LireSorts.cc
  src/Base/LireSorts.h  
  src/Base/SortsEcoles.cc
  src/Base/SortsEcoles.h
  src/Base/ListeSorts.cc
  src/Base/ListeSorts.h
  src/Base/Martiale.cc
  src/Base/Martiale.h
  src/Base/LireMartiales.cc
  src/Base/LireMartiales.h
  src/Base/NonMartiale.cc
  src/Base/NonMartiale.h
  src/Base/CapaciteRaciale.cc
  src/Base/CapaciteRaciale.h
  src/Base/EnsembleCapacitesRaciales.cc
  src/Base/EnsembleCapacitesRaciales.h
  src/Base/CompetenceClasse.cc
  src/Base/CompetenceClasse.h
  src/Base/EnsembleCompetencesClasse.cc
  src/Base/EnsembleCompetencesClasse.h
)

SET( EXECUTABLE_OUTPUT_PATH "./bin/tests" )

ADD_EXECUTABLE( NouveauJoueur.exe ${LOG_SRCS} ${UTILS_SRCS} ${PARSER_SRCS} ${BASE_SRCS} ${CLASSES_SRCS} ${RACES_SRCS} ${CORE_SRCS} src/Base/NouveauJoueur.cc )
